import { defineStore } from 'pinia'

const useSettingsStore = defineStore('settings', {
  state: () => ({
    theme: '#409EFF',
    showSettings: false,
    tagsView: true,
    fixedHeader: false,
    sidebarLogo: true,
    supportPinyinSearch: true,
    showBreadcrumb: true,
    showTags: true,
    showFooter: true,
    menuCollapse: false,
    language: 'zh'
  }),
  
  actions: {
    changeSetting({ key, value }) {
      if (this.hasOwnProperty(key)) {
        this[key] = value
      }
    }
  }
})

export default useSettingsStore